<?php
try{
	include '../ini.php';
    include '../classes/xl_statistics.php';
    $dt_xl_statistics=new xl_statistics;
    $list_online=$dt_xl_statistics->read_online();
    $i=0;
    foreach($list_online as $online){
        if($online['status'] == 1){
            $i++;
        }
    }
    $dt_smarty->assign('online',$i);
    $dt_smarty->assign('list_online',$list_online);
	$contenForLayout=$dt_smarty->fetch('statistics/index.tpl');
	$dt_smarty->assign('contenForLayout',$contenForLayout);
	$dt_smarty->assign('titleForLayout','Thống kê');
	$dt_smarty->display('layout/defaults.tpl');
    $dt_smarty->fetch('scripts/js/maruti.dashboard.js');
    $dbh=NULL;
	
} catch(Exception $e){
	$_SESSION['msg']=$e->getMessage();
    $_SESSION['type_msg']='error';
	$dbh=NULL;
}